<!-- Menu Toggle Button -->

<a href="#" class="dropdown-toggle" data-toggle="dropdown">
  <!-- The user image in the navbar-->
  {{#if islogin }}
  <img src="/public/libs/user2-160x160.jpg" class="user-image" alt="User Image">
  <span class="hidden-xs">您好:{{username}}</span>
  {{else}}
  <!-- hidden-xs hides the username on small devices so only the image appears. -->
  <span class="hidden-xs" name="login">登录</span>
  <span class="hidden-xs" name="signin">注册</span>
  {{/if}}

</a>
<ul class="dropdown-menu">
  <!-- The user image in the menu -->
  {{#if islogin}}
  <li class="user-header">
    <img src="/public/libs/user2-160x160.jpg" class="img-circle" alt="User Image">
    <p>
      欢迎登录
      <small>{{username}}</small>
    </p>
  </li>
  {{else}}
  <li class="user-header">
    <div class="box-header with-border">
      <h3 class="box-title">Horizontal Form</h3>
    </div>
    <form class="form-horizontal" id="user-form">
      <div class="box-body">
        <div class="form-group">
          <label for="inputEmail3" class="col-sm-4 control-label">账户</label>

          <div class="col-sm-8">
            <input type="text" class="form-control" name="username" placeholder="账户">
          </div>
        </div>
        <div class="form-group">
          <label for="inputPassword3" class="col-sm-4 control-label">密码</label>

          <div class="col-sm-8">
            <input type="password" class="form-control" name="password" placeholder="Password">
          </div>
        </div>

    </form>

  </li>
  {{/if}}

  <!-- Menu Footer-->
  {{#if islogin}}
  <li class="user-footer">
    <div class="pull-left">
      <a href="#" class="btn btn-default btn-flat">取消</a>
    </div>
    <div class="pull-right">
      <a href="#" class="btn btn-default btn-flat" name='quit'>退出</a>
    </div>
  </li>
  {{else}}

  <li class="user-footer">
    <div class="pull-left">
      <a href="#" class="btn btn-default btn-flat">取消</a>
    </div>
    <div class="pull-right">
      <a href="#" class="btn btn-default btn-flat" name="submit">确定</a>
    </div>
  </li>
  {{/if}}

</ul>